<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
 /* 
  var ary2=[1,2,1,3,3,2,3];
  var newAry=[];
  把原数组中的每一项，只要在新数组中没存在过，我们就把它放进去，最后newAry就是咱们最终要的数组
*/
    function sz(ary){
        var newAry=[];
        for(var i=0;i<ary.length;i++){
            var item=ary[i];
            if(newAry.indexOf(item)==-1){
                newAry.push(item);
            }
        }
        return newAry;
    }
var ary2=[1,2,1,2,3,2,3];
var res=sz(ary2);
console.log(res);

</script>